﻿
namespace SvGame.Objects;

[Desc("房间")]
public class Room
{
    [Desc("UID")]
    public long Uid = 0;

    [Desc("配置")]
    public ConfigRoomExt CfgExt = null;
    public ConfigRoom Cfg => CfgExt.SettBase;

    public string Name => Cfg.Name;
    public string Desc => Cfg.Desc;
    public bool NoTime => Cfg.NoTime;

    [Desc("出口")]
    public Dictionary<string, RoomExit> DictExit = new();

    [Desc("道具")]
    public Dictionary<long, Item> DictItem = new();

    [Desc("装备")]
    public Dictionary<long, Equip> DictEquip = new();

    [Desc("NPC")]
    public Dictionary<long, Npc> DictNpc = new();

    [Desc("玩家")]
    public Dictionary<long, Player> DictPlayer = new();

    public bool Same(Room ob) => Uid == ob.Uid;
}
[Desc("房间出口")]
public class RoomExit
{
    [Desc("方向")]
    public string Dir = "方向";
    [Desc("房间ID")]
    public long RoomUid = 0;

}